/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package se.sll.engagemangsindex.dto;

import java.io.Serializable;
import lombok.Data;
import riv.itintegration.engagementindex._1.EngagementType;

/**
 *
 * @author khaleddaham
 */
@Data
public class EngagementTypeImpl implements Serializable {
    private final String registeredResidentIdentification;
    private final String serviceDomain;
    private final String categorization;
    private final String logicalAddress;
    private final String businessObjectInstanceIdentifier;
    private final String clinicalProcessInterestId;
    private final String mostRecentContent;
    private final String sourceSystem;
    private final String creationTime;
    private final String updateTime;
    private String owner;
    
    public EngagementTypeImpl(EngagementType e) {
        this.businessObjectInstanceIdentifier = e.getBusinessObjectInstanceIdentifier();
        this.categorization = e.getCategorization();
        this.creationTime = e.getCreationTime();
        this.clinicalProcessInterestId = e.getClinicalProcessInterestId();
        this.logicalAddress = e.getLogicalAddress();
        this.mostRecentContent = e.getMostRecentContent();
        this.owner = e.getOwner();
        this.registeredResidentIdentification = e.getRegisteredResidentIdentification();
        this.serviceDomain = e.getServiceDomain();
        this.sourceSystem = e.getSourceSystem();
        this.updateTime = e.getUpdateTime();
    }
      
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final EngagementTypeImpl other = (EngagementTypeImpl) obj;
        if ((this.registeredResidentIdentification == null) ? (other.registeredResidentIdentification != null) : !this.registeredResidentIdentification.equals(other.registeredResidentIdentification)) {
            return false;
        }
        if ((this.serviceDomain == null) ? (other.serviceDomain != null) : !this.serviceDomain.equals(other.serviceDomain)) {
            return false;
        }
        if ((this.categorization == null) ? (other.categorization != null) : !this.categorization.equals(other.categorization)) {
            return false;
        }
        if ((this.logicalAddress == null) ? (other.logicalAddress != null) : !this.logicalAddress.equals(other.logicalAddress)) {
            return false;
        }
        if ((this.businessObjectInstanceIdentifier == null) ? (other.businessObjectInstanceIdentifier != null) : !this.businessObjectInstanceIdentifier.equals(other.businessObjectInstanceIdentifier)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 59 * hash + (this.registeredResidentIdentification != null ? this.registeredResidentIdentification.hashCode() : 0);
        hash = 59 * hash + (this.serviceDomain != null ? this.serviceDomain.hashCode() : 0);
        hash = 59 * hash + (this.categorization != null ? this.categorization.hashCode() : 0);
        hash = 59 * hash + (this.logicalAddress != null ? this.logicalAddress.hashCode() : 0);
        hash = 59 * hash + (this.businessObjectInstanceIdentifier != null ? this.businessObjectInstanceIdentifier.hashCode() : 0);
        return hash;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }
}